<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<title>List</title>
<!-- for-mobile-apps -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
		function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- //for-mobile-apps -->
<link href="${pageContext.request.contextPath}/front-style/css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<!-- pop-up -->
<link href="${pageContext.request.contextPath}/front-style/css/popuo-box.css" rel="stylesheet" type="text/css" media="all" />
<!-- //pop-up -->
	<link href="${pageContext.request.contextPath}/front-style/css/layui.css" rel="stylesheet" type="text/css" media="all" />
<link href="${pageContext.request.contextPath}/front-style/css/easy-responsive-tabs.css" rel='stylesheet' type='text/css'/>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/zoomslider.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/table-style.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/basictable.css" />
<!-- list-css -->
<link rel="stylesheet" href="${pageContext.request.contextPath}/front-style/css/list.css" type="text/css" media="all" />
<!-- //list-css -->
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/style.css" />
<link href="${pageContext.request.contextPath}/front-style/css/font-awesome.css" rel="stylesheet"> 
<script type="text/javascript" src="${pageContext.request.contextPath}/front-style/js/modernizr-2.6.2.min.js"></script>
<!--/web-fonts-->
<link href='http://fonts.googleapis.com/css?family=Tangerine:400,700' rel='stylesheet' type='text/css'>
<link href="http://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<!--//web-fonts-->
</head>
<body>
<!--/main-header-->
  <!--/banner-section-->
	<div id="demo-1" class="banner-inner">
	 <div class="banner-inner-dott">
		<!--/header-w3l-->
			   <div class="header-w3-agileits" id="home1">
			     <div class="inner-header-agile part2">	
				<nav class="navbar navbar-default">
					<div class="navbar-header">
						<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
							<span class="sr-only">Toggle navigation</span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						</button>
						<h1><a  href="${pageContext.request.contextPath}/index.jsp"><span>M</span>ovies <span>P</span>ro</a></h1>
					</div>
					<!-- navbar-header -->
					<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
										<%--		<ul class="nav navbar-nav">
							<li><a href="${pageContext.request.contextPath}/index.jsp">Home</a></li>
							<li class="dropdown active">
								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Genre <b class="caret"></b></a>
								<ul class="dropdown-menu multi-column columns-3">
									<li>
										<div class="col-sm-4">
											<ul class="multi-column-dropdown">
												<li><a href="genre.html">Action</a></li>
												<li><a href="genre.html">Biography</a></li>
												<li><a href="genre.html">Crime</a></li>
												<li><a href="genre.html">Family</a></li>
												<li><a href="horror.html">Horror</a></li>
												<li><a href="genre.html">Romance</a></li>
												<li><a href="genre.html">Sports</a></li>
												<li><a href="genre.html">War</a></li>
											</ul>
										</div>
										<div class="col-sm-4">
											<ul class="multi-column-dropdown">
												<li><a href="genre.html">Adventure</a></li>
												<li><a href="comedy.html">Comedy</a></li>
												<li><a href="genre.html">Documentary</a></li>
												<li><a href="genre.html">Fantasy</a></li>
												<li><a href="genre.html">Thriller</a></li>
											</ul>
										</div>
										<div class="col-sm-4">
											<ul class="multi-column-dropdown">
												<li><a href="genre.html">Animation</a></li>
												<li><a href="genre.html">Costume</a></li>
												<li><a href="genre.html">Drama</a></li>
												<li><a href="genre.html">History</a></li>
												<li><a href="genre.html">Musical</a></li>
												<li><a href="genre.html">Psychological</a></li>
											</ul>
										</div>
										<div class="clearfix"></div>
									</li>
								</ul>
							</li>
							<li><a href="series.html">tv - series</a></li>
							<li><a href="news.html">news</a></li>
							<li class="dropdown">
								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Country <b class="caret"></b></a>
								<ul class="dropdown-menu multi-column columns-3">
									<li>
										<div class="col-sm-4">
											<ul class="multi-column-dropdown">
												<li><a href="genre.html">Asia</a></li>
												<li><a href="genre.html">France</a></li>
												<li><a href="genre.html">Taiwan</a></li>
												<li><a href="genre.html">United States</a></li>
											</ul>
										</div>
										<div class="col-sm-4">
											<ul class="multi-column-dropdown">
												<li><a href="genre.html">China</a></li>
												<li><a href="genre.html">HongCong</a></li>
												<li><a href="genre.html">Japan</a></li>
												<li><a href="genre.html">Thailand</a></li>
											</ul>
										</div>
										<div class="col-sm-4">
											<ul class="multi-column-dropdown">
												<li><a href="genre.html">Euro</a></li>
												<li><a href="genre.html">India</a></li>
												<li><a href="genre.html">Korea</a></li>
												<li><a href="genre.html">United Kingdom</a></li>
											</ul>
										</div>
										<div class="clearfix"></div>
									</li>
								</ul>
							</li>
							<li><a href="list.html">A - z list</a></li>
							<li><a href="contact.html">Contact</a></li>
						</ul>

					--%></div>
					<div class="clearfix"> </div>	
				</nav>
					<div class="w3ls_search">
									<div class="cd-main-header">
										<ul class="cd-header-buttons">
											<li><a class="cd-search-trigger" href="#cd-search"><span></span></a></li>
											<li style="margin-top:-20px"><button class="layui-btn layui-btn-radius" type="button" onclick="getMoviesandclean()" >重置查询</button></li>
										</ul> <!-- cd-header-buttons -->
									</div>
									<div id="cd-search" class="cd-search">
										<form action="javascript:getMovies(1)" method="post">
											<input name="Search" type="search" placeholder="Search..." id="keyWords">
										</form>
									</div>
								</div>
	
			</div> 

			   </div>
		<!--//header-w3l-->
		</div>
    </div>
  <!--/banner-section-->
 <!--//main-header-->
	         <!--/banner-bottom-->
			  <div class="w3_agilits_banner_bootm">
			     <div class="w3_agilits_inner_bottom">
			            <div class="col-md-6 wthree_agile_login">
							<%--显示跳转条--%>
							<c:if test="${sessionScope.userinfo!=null}">
								<ul>
									<li><i class="fa fa-phone" aria-hidden="true"></i> (+000) 009 455 4088</li>
									<li><div style="width: 20px"></div></li>
									<li><img style="height: 40px;width: 40px;margin-top: -10px" src="${pageContext.request.contextPath}/DownloadFileServlet?fileName=${sessionScope.userinfo.user_img}" alt="头像"></li>
									<li><div style="width: 20px"></div></li>
									<li><i>${sessionScope.userinfo.user_acount}</i></li>
									<li><div style="width: 20px"></div></li>
									<li><a href="#" class="login" data-toggle="modal" data-target="#myModall6">个人中心</a></li>
									<li><a class="login" href="${pageContext.request.contextPath}/userinfo/exit">退出</a></li>
									<c:if test="${sessionScope.userinfo!=null}">
										<li><a class="login" href="${pageContext.request.contextPath}/orders/toOrderList">订单列表</a></li>
									</c:if>
								</ul>
							</c:if>
							<c:if test="${sessionScope.userinfo==null}">
								<ul>
									<li><i class="fa fa-phone" aria-hidden="true"></i> (+000) 009 455 4088</li>
									<li><a href="#" class="login"  data-toggle="modal" data-target="#myModal4">登录</a></li>
									<%--<li><a href="#" class="login reg"  data-toggle="modal" data-target="#myModal5">注册</a></li>--%>

								</ul>
							</c:if>
						</div>
						 <div class="col-md-6 wthree_share_agile">

						</div>
				</div>
			</div>
			<!--//banner-bottom-->
		     <!-- Modal1 -->
<div class="modal fade" id="myModal4" tabindex="-1" role="dialog">

	<div class="modal-dialog">
		<!-- Modal content-->
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4>登录</h4>
				<div class="login-form">
					<form action="${pageContext.request.contextPath}/userinfo/login" method="post">
						<input type="text" name="user_acount" placeholder="账号" required="">
						<input type="password" name="user_password" placeholder="密码" required="">
						<div class="tp">
							<input type="submit" value="登录">
						</div>
						<div class="forgot-grid">
							<div class="log-check">
								<label class="checkbox"><input type="checkbox" name="checkbox">记住我</label>
							</div>
							<div class="forgot">
								<a href="#" data-toggle="modal" data-target="#myModal2">忘记密码</a>
							</div>
							<div class="clearfix"></div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div><!-- //Modal1 -->
				  <!-- Modal1 -->
					<div class="modal fade" id="myModal5" tabindex="-1" role="dialog" >

							<div class="modal-dialog">
							<!-- Modal content-->
								<div class="modal-content">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal">&times;</button>
										<h4>Register</h4>
										<div class="login-form">
											<form action="#" method="post">
											    <input type="text" name="name" placeholder="Name" required="">
												<input type="email" name="email" placeholder="E-mail" required="">
												<input type="password" name="password" placeholder="Password" required="">
												<input type="password" name="conform password" placeholder="Confirm Password" required="">
												<div class="signin-rit">
														<span class="agree-checkbox">
														<label class="checkbox"><input type="checkbox" name="checkbox">I agree to your <a class="w3layouts-t" href="#" target="_blank">Terms of Use</a> and <a class="w3layouts-t" href="#" target="_blank">Privacy Policy</a></label>
													</span>
												</div>
												<div class="tp">
													<input type="submit" value="REGISTER NOW">
												</div>
											</form>
										</div>
									</div>
								</div>
							</div>
						</div>
				<!-- //Modal1 -->
						<!-- breadcrumb -->
	<div class="w3_breadcrumb">
	<div class="breadcrumb-inner">	
			<ul>
				<li><a href="${pageContext.request.contextPath}/index.jsp">主页</a><i>//</i></li>
				<li>查询电影</li>
			</ul>
		</div>
	</div>
<!-- //breadcrumb -->
			<!--/content-inner-section-->
				<div class="w3_content_agilleinfo_inner">
						<div class="agile_featured_movies">
						<div class="inner-agile-w3l-part-head">
					            <h3 class="w3l-inner-h-title">电影列表</h3>
								<p class="w3ls_head_para">体验异乡风情,从多看电影开始</p>
							</div>
				                   <div class="bs-example bs-example-tabs" role="tabpanel" data-example-id="togglable-tabs">

						<div id="myTabContent" class="tab-content">
							<div role="tabpanel" class="tab-pane fade in active" id="home" aria-labelledby="home-tab">
								<div class="agile-news-table">

									<table id="table-breakpoint">
										<thead>
										   <tr>
											<th>序号</th>
											<th>电影名</th>
											<th>上映时间</th>
											<th>类型</th>
											<th>时长</th>
											<th>票价</th>
											<th>评分</th>
										  </tr>
										</thead>
										<tbody id="showMoviesTable">

										</tbody>
									</table>
								</div>
							</div>

						</div>

						</div>
				</div>
			</div>
<span id="getKeyWords"><%=(String) request.getAttribute("keyWord")%></span>
<%  request.removeAttribute("keyWord"); %>
<%--layui分页--%>
<div id="demo0" class="text-center">
	<div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-1">

	</div>
</div>
			<!--//content-inner-section-->


	<!--/footer-bottom-->
	<div class="contact-w3ls" id="contact">
			<div class="footer-w3lagile-inner">
				<h2><span>下次一定影院在线系统</span></h2>
				<p class="para">不要下次一定,这就是一定.</p>
					<div class="footer-grids w3-agileits">
						<div class="col-md-2 footer-grid">
						<h4>广告位</h4>
							<ul>
								<li><a href="javascript:void(0)">广告位招租</a></li>
								<li><a href="javascript:void(0)">广告位招租</a></li>
								<li><a href="javascript:void(0)">广告位招租</a></li>
								<li><a href="javascript:void(0)">广告位招租</a></li>
								<li><a href="javascript:void(0)">广告位招租</a></li>
								<li><a href="javascript:void(0)">广告位招租</a></li>
							</ul>
						</div>
							<div class="col-md-2 footer-grid">
						<h4>广告位</h4>
							<ul>
								
								<li><a href="javascript:void(0)">广告位招租</a></li>
								<li><a href="javascript:void(0)">广告位招租</a></li>
								<li><a href="javascript:void(0)">广告位招租</a></li>
								<li><a href="javascript:void(0)">广告位招租</a></li><li><a href="javascript:void(0)">广告位招租</a></li>
								<li><a href="javascript:void(0)">广告位招租</a></li>


								
							</ul>
						</div>
				

							<div class="col-md-2 footer-grid">
								<h4>合作单位</h4>
									<ul class="w3-tag2">
									<li><a href="javascript:void(0)">合作单位1</a></li>
									<li><a href="javascript:void(0)">合作单位2</a></li>
									<li><a href="javascript:void(0)">合作单位3</a></li>
									<li><a href="javascript:void(0)">合作单位4</a></li>
									<li><a href="javascript:void(0)">合作单位5</a></li>
									<li><a href="javascript:void(0)">合作单位6</a></li>
									<li><a href="javascript:void(0)">合作单位7</a></li>
								</ul>


						</div>
								<div class="col-md-2 footer-grid">
						<h4>合作院线</h4>
							<div class="footer-grid1">
								<div class="footer-grid1-left">
									<a href="javascript:void(0)"><img src="${pageContext.request.contextPath}/front-style/images/1.jpg" alt=" " class="img-responsive"></a>
								</div>
								<div class="footer-grid1-right">
									<a href="javascript:void(0)">左侧放logo,右侧是名字</a>
									
								</div>
								<div class="clearfix"> </div>
							</div>
						</div>
						<div class="col-md-2 footer-grid">
						   <h4 class="b-log"><a href="${pageContext.request.contextPath}/index.jsp"><span>我</span>的 <span>院</span>线</a></h4>

							<div class="clearfix"> </div>
						</div>
						<div class="clearfix"> </div>
						<ul class="bottom-links-agile">
								<li><a href="javascript:void(0)" title="Font Icons" class="aiguo">民主</a></li>
								<li><a href="javascript:void(0)" title="Short Codes" class="aiguo">富强</a></li>
								<li><a href="javascript:void(0)" title="contact" class="aiguo">爱国</a></li>
								
							</ul>
					</div>

					
			 </div>
						
			</div>
			<div class="w3agile_footer_copy">
				    <p>制作团队 &copy; 四期三阶段.严宇 赵井东 陆亮.<a target="_blank" href="http://www.baidu.com/">有问题问百度</a></p>
			</div>
		<a href="#home" id="toTop" class="scroll" style="display: block;"> <span id="toTopHover" style="opacity: 1;"> </span></a>

<script src="${pageContext.request.contextPath}/front-style/js/jquery-1.11.1.min.js"></script>
	<!-- Dropdown-Menu-JavaScript -->
			<script>
				$(document).ready(function(){
					$(".dropdown").hover(            
						function() {
							$('.dropdown-menu', this).stop( true, true ).slideDown("fast");
							$(this).toggleClass('open');        
						},
						function() {
							$('.dropdown-menu', this).stop( true, true ).slideUp("fast");
							$(this).toggleClass('open');       
						}
					);
				});
			</script>
		<!-- //Dropdown-Menu-JavaScript -->
		<!-- search-jQuery -->
				<script src="${pageContext.request.contextPath}/front-style/js/main.js"></script>
			
			<script src="${pageContext.request.contextPath}/front-style/js/simplePlayer.js"></script>
			<script>
				$("document").ready(function() {
					$("#video").simplePlayer();
				});
			</script>
			<script>
				$("document").ready(function() {
					$("#video1").simplePlayer();
				});
			</script>
			<script>
				$("document").ready(function() {
					$("#video2").simplePlayer();
				});
			</script>
				<script>
				$("document").ready(function() {
					$("#video3").simplePlayer();
				});
			</script>
			<script>
				$("document").ready(function() {
					$("#video4").simplePlayer();
				});
			</script>
			<script>
				$("document").ready(function() {
					$("#video5").simplePlayer();
				});
			</script>
			<script>
				$("document").ready(function() {
					$("#video6").simplePlayer();
				});
			</script>

			<!-- pop-up-box -->  
		<script src="${pageContext.request.contextPath}/front-style/js/jquery.magnific-popup.js" type="text/javascript"></script>
	<!--//pop-up-box -->

			<div id="small-dialog1" class="mfp-hide">
	<iframe src=""></iframe>
	</div>
	<div id="small-dialog2" class="mfp-hide">
		<iframe src=""></iframe>
	</div>
	<script>
		$(document).ready(function() {
		$('.w3_play_icon,.w3_play_icon1,.w3_play_icon2').magnificPopup({
			type: 'inline',
			fixedContentPos: false,
			fixedBgPos: true,
			overflowY: 'auto',
			closeBtnInside: true,
			preloader: false,
			midClick: true,
			removalDelay: 300,
			mainClass: 'my-mfp-zoom-in'
		});
																		
		});
	</script>
<script src="${pageContext.request.contextPath}/front-style/js/easy-responsive-tabs.js"></script>
<script>
$(document).ready(function () {
$('#horizontalTab').easyResponsiveTabs({
type: 'default', //Types: default, vertical, accordion           
width: 'auto', //auto or any width like 600px
fit: true,   // 100% fit in a container
closed: 'accordion', // Start closed if in accordion view
activate: function(event) { // Callback function if tab is switched
var $tab = $(this);
var $info = $('#tabInfo');
var $name = $('span', $info);
$name.text($tab.text());
$info.show();
}
});
$('#verticalTab').easyResponsiveTabs({
type: 'vertical',
width: 'auto',
fit: true
});
});
</script>
<!-- tables -->
<script type="text/javascript" src="${pageContext.request.contextPath}/front-style/js/jquery.basictable.min.js"></script>

 <script type="text/javascript">
    $(document).ready(function() {
      $('#table').basictable();

      $('#table-breakpoint').basictable({
        breakpoint: 768
      });
	   $('#table-breakpoint1').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint2').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint3').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint4').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint5').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint6').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint7').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint8').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint9').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint10').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint11').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint12').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint13').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint14').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint15').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint16').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint17').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint18').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint19').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint20').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint21').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint22').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint23').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint24').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint25').basictable({
        breakpoint: 768
      });
	  $('#table-breakpoint26').basictable({
        breakpoint: 768
      });
    });
  </script>
<!-- //tables -->


<!--/script-->
<script type="text/javascript" src="${pageContext.request.contextPath}/front-style/js/move-top.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/front-style/js/easing.js"></script>

<script type="text/javascript">
			jQuery(document).ready(function($) {
				$(".scroll").click(function(event){		
					event.preventDefault();
					$('html,body').animate({scrollTop:$(this.hash).offset().top},900);
				});
			});
</script>
 <script type="text/javascript">
						$(document).ready(function() {
							/*
							var defaults = {
					  			containerID: 'toTop', // fading element id
								containerHoverID: 'toTopHover', // fading element hover id
								scrollSpeed: 1200,
								easingType: 'linear' 
					 		};
							*/
							
							$().UItoTop({ easingType: 'easeOutQuart' });
							
						});
					</script>
<!--end-smooth-scrolling-->
	<script src="${pageContext.request.contextPath}/front-style/js/bootstrap.js"></script>

 

</body>
<script>
var ssss="";
	$(function () {
		getMovies();


		$("#searchButton").click(function(){
			if($("#keyWords").val()=="" && $("#keyWords").val()==null){
				getMovies();
			}
		});

		$(".aiguo").click(function(){
			alert("你真棒!!!发现彩蛋,去吧台给你优惠")
		});
	});

	function getMovies(pageno){
			if ($("#getKeyWords").text()!=""){
				$("#keyWords").val($("#getKeyWords").text());
				$("#getKeyWords").text("");
			}
         $.ajax({
				 async:true,
				 url:"${pageContext.request.contextPath}/movies/getAllMovies",
				 data:{moviesName:$("#keyWords").val(),
					 pageNum:pageno,
					 pageSize:5
				 },
			 dataType:"json",
			 success:function(result){
			 	$("#showMoviesTable").empty();
			 	var content="";
			 	$.each(result.list,function(n,movies){
			 		content+=" <tr>\n" +
							"\t\t\t\t\t\t\t\t\t\t\t<td>"+(n+1)+"</td>\n" +
							"<td class=\"w3-list-img\"><a href=\"${pageContext.request.contextPath}/movies/goOrderDtail?movieNo="+movies.movieNo+"\"><img src=\"${pageContext.request.contextPath}/DownloadFile?movieImg="+movies.movieImg+"\" alt=\"\" /> <span>"+movies.movieName+"</span></a></td>" +
							"\t\t\t\t\t\t\t\t\t\t\t<td>"+movies.movieDate+"</td>\n" +
							"\t\t\t\t\t\t\t\t\t\t\t<td>"+movies.categorys.category_name+"</td>\n" +
							"\t\t\t\t\t\t\t\t\t\t\t<td class=\"w3-list-info\">"+movies.movieTime+"</td>\n" +
							"\t\t\t\t\t\t\t\t\t\t\t<td class=\"w3-list-info\">"+movies.moviePrice+"</td>\n"+getScore(movies.movieNo);
			 		console.log("带入的id值:"+movies.movieNo);
				});
				 $("#showMoviesTable").html(content);
				 $("#getPageNo").text(result.pageNum);
				 $("#layui-laypage-1").empty();
				 if(1==result.pageNum){
					 $("#layui-laypage-1").append('<a class="layui-laypage-prev layui-disabled" href="javascript:;">上一页</a>');
				 }else{
					 $("#layui-laypage-1").append('<a class="layui-laypage-prev" href="javascript:getMovies('+(result.pageNum-1)+')">上一页</a>');
				 }
				 for(var i=1;i<=result.pages;i++){
					 if(i==result.pageNum){
						 $("#layui-laypage-1").append('<span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>'+i+'</em></span>');
					 }else{
						 $("#layui-laypage-1").append('<a href="javascript:getMovies('+i+')">'+i+'</a>');
					 }
				 }
				 if(result.pageNum==result.pages){
					 $("#layui-laypage-1").append(' <a class="layui-laypage-next layui-disabled" href="javascript:;"> 下一页</a>');
				 }else{
					 $("#layui-laypage-1").append(' <a class="layui-laypage-next" href="javascript:getMovies('+(result.pageNum*1+1)+')"> 下一页</a>');
				 }
			 }
		 });

	}

	function getScore(moviesN0){
		var content2="";
		$.ajax({
			async:false,
			url:"${pageContext.request.contextPath}/comments/avgScore",
			data:{movie_no:moviesN0},
			dataType:"text",
			success:function(result){
				console.log("带出的值"+result);
				if (result != "0.00"){
					result=result.substring(0,4);
				}
				content2+="\t\t\t\t\t\t\t\t\t\t\t<td>"+result+"</td>\n" +
						"\t\t\t\t\t\t\t\t\t\t </tr>";

			}
		});
		return content2;
	}

	function getMoviesandclean(){
		$("#getKeyWords").text("");
		$("#keyWords").val("");
		getMovies(1);
	}

</script>
</html>